package kr.co.redcircle.console.dialog.contents;

import kr.co.redcircle.console.dialog.ConsoleDialogContents;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wb.swt.SWTResourceManager;

public class LoginDialogContents extends ConsoleDialogContents {
	
	private Text text;
	private Text text_1;
	private Text text_2;
	private Text text_3;

	public LoginDialogContents(Composite parent, int style) {
		super(parent, style);
	}
	
	public LoginDialogContents(Composite parent, Integer style, Point dialogSize, Rectangle contentsBound) {
		super(parent, style, dialogSize, contentsBound);
	}

	/**
	 * Create contents of the dialog.
	 * @param parent 
	 */
	public void createContents(Shell diagShell) {
		
		Group grpNameNode = new Group(diagShell, SWT.NONE);
		grpNameNode.setText("Name Node");
		grpNameNode.setBounds(10, 10, 304, 52);
		
		CLabel lblNewLabel = new CLabel(grpNameNode, SWT.NONE);
		lblNewLabel.setImage(SWTResourceManager.getImage(LoginDialogContents.class, "/kr/co/redcircle/icons/bullet-blue.ico"));
		lblNewLabel.setBounds(10, 22, 62, 21);
		lblNewLabel.setText("Host");
		
		text = new Text(grpNameNode, SWT.BORDER);
		text.setBounds(78, 22, 73, 21);
		
		CLabel lblNewLabel_1 = new CLabel(grpNameNode, SWT.NONE);
		lblNewLabel_1.setImage(SWTResourceManager.getImage(LoginDialogContents.class, "/kr/co/redcircle/icons/bullet-blue.ico"));
		lblNewLabel_1.setBounds(157, 22, 58, 21);
		lblNewLabel_1.setText("Port");
		
		text_1 = new Text(grpNameNode, SWT.BORDER);
		text_1.setBounds(221, 22, 49, 21);
		
		Group grpAccount = new Group(diagShell, SWT.NONE);
		grpAccount.setText("Account");
		grpAccount.setBounds(10, 68, 304, 82);
		
		CLabel lblId = new CLabel(grpAccount, SWT.NONE);
		lblId.setImage(SWTResourceManager.getImage(LoginDialogContents.class, "/kr/co/redcircle/icons/bullet-red.ico"));
		lblId.setBounds(10, 30, 39, 21);
		lblId.setText("ID");
		
		text_2 = new Text(grpAccount, SWT.BORDER);
		text_2.setBounds(55, 30, 82, 21);
		
		CLabel lblPw = new CLabel(grpAccount, SWT.NONE);
		lblPw.setImage(SWTResourceManager.getImage(LoginDialogContents.class, "/kr/co/redcircle/icons/bullet-red.ico"));
		lblPw.setBounds(143, 30, 48, 21);
		lblPw.setText("PW");
		
		text_3 = new Text(grpAccount, SWT.BORDER);
		text_3.setBounds(197, 30, 73, 21);
		
		ProgressBar progressBar = new ProgressBar(diagShell, SWT.NONE);
		progressBar.setSelection(50);
		progressBar.setBounds(10, 156, 304, 17);
		
		Button btnNewButton = new Button(diagShell, SWT.NONE);
		btnNewButton.setBounds(238, 206, 76, 25);
		btnNewButton.setText("Cancel");
		
		Button btnNewButton_1 = new Button(diagShell, SWT.NONE);
		btnNewButton_1.setBounds(155, 206, 76, 25);
		btnNewButton_1.setText("Login");
		
		CLabel lblNewLabel_3 = new CLabel(diagShell, SWT.NONE);
		lblNewLabel_3.setImage(SWTResourceManager.getImage(LoginDialogContents.class, "/kr/co/redcircle/icons/bullet-black.ico"));
		lblNewLabel_3.setBounds(9, 179, 305, 21);
		lblNewLabel_3.setText("login processing...");

	}

	@Override
	public void setupMessageContents() {
		// TODO Auto-generated method stub
		
	}
}
